#include<iostream>
using namespace std;

int main() {
    int arr[10];
    memset(arr, 0, sizeof(arr));
    string s;
    cout << "请输入一个字符串" << endl;
    cin >> s;
    for (int i = 0, len = (int)s.length(); i != len; i++) {
        int temp = int(s[i] - '0');
        if (temp < 0 || temp > 9) {
            cout << "有错误，直接退出" << endl;
            return -1;
        }
        arr[temp] ++;
        
    }
    for (int i = 0; i != 10; i ++) {
        cout << arr[i] << " " ;
    }
    return 0;
}
